<html xmlns:layout="http://www.thymeleaf.org/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org" th:remove="tag">
<div class="ui breadcrumb">
	<a href="#/dashboard" class="section">Dashboard</a>
	<i class="right angle icon divider"></i>
	<a class="section" href="#/admin">Administration</a>
	<i class="right angle icon divider"></i>
	<div class="section active">Websites</div>
</div>
<div class="ui divider hidden"></div>
<div class="ui stackable grid">
	<div class="column"></div>
	<div class="fourteen wide column">
		<div class="ui basic segment" ng-class="{loading:loading}">
			
			<div class="ui two column grid">
				<div class="column"></div>
				<div class="column">
					<div class="ui right floated horizontal list">
						<div class="item" ng-show="websites.totalElements>0">SHOWING {{websites.number*websites.size+1}}-{{websites.number*websites.size+websites.numberOfElements}} OF {{websites.totalElements}}</div>
						<a class="item" ng-class="{disabled:websites.first}" href="" ng-click="pageAt(websites.number)"><i class="icon angle double left"></i>Previous</a>
						<a class="item" ng-class="{disabled:websites.last}" href="" ng-click="pageAt(websites.number+2)">Next<i class="icon angle double right"></i></a>
					</div>
				</div>
			</div>
			<div class="ui divider"></div>
			<div class="ui very relaxed list divided">
				<div class="item" ng-repeat="website in websites.content">
					<i class="globe huge disabled icon" ng-class="{ENABLED:'green',DISABLED:'orange',PENDING_REMOVE:'red'}[website.status]"></i>
					<div class="content">
						<div class="header"><a ng-href="#/admin/websites/{{website.id}}">{{website.name}}</a></div>
						<div class="description">{{website.description}}</div>
						<div class="description"></div>
						<div class="ui list">
							<div class="item"><span class="ui red basic label" ng-if="website.status=='PENDING_REMOVE'"><i class="icon calendar"></i> Website deletion at {{(website.deleteRequestedAt+604800000)|date:'medium'}}</span></div>
							<div class="item" ng-if="website.status=='DISABLED'"><span class="ui orange basic label">Website disabled</span></div>
							<div class="item" ng-if="website.status=='ENABLED'" ng-repeat="host in website.hosts"><i class="icon globe"></i>{{host}}</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

</html>